package cn.learn.designpattern.decorator.decorator;

/**
 * @author huangyezhan
 * @version 1.0
 * @date 2021年07月11日10:18
 */
public class TestDecorator {

    public static void main(String[] args) {
        //走路
        Component component = new ConcreteComponent();
        //车
        Component decoratorA = new ConcreteDecoratorA(component);
        //飞机
        Component decoratorB = new ConcreteDecoratorB(decoratorA);
        decoratorB.sampleOperation();
    }

}
